﻿Public Class frmMenu

    Public veces As Integer = 0
    Public vezImprePro As Integer = 0

    Public formDocumento As New frmDocumento

    Private Sub SalirToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles SalirToolStripMenuItem.Click
        frmLogueo.Show()
        Me.Close()
    End Sub

    Private Sub ActualizarRutasToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles ActualizarRutasToolStripMenuItem.Click
        Dim rutas As New frmActualizarRutas
        rutas.MdiParent = Me
        rutas.Show()
    End Sub

    Private Sub AsignacionVehiculosToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles AsignacionVehiculosToolStripMenuItem.Click
        Dim vehiculos As New frmAsignacionProgramación
        vehiculos.MdiParent = Me
        vehiculos.Show()
    End Sub

    Private Sub ConfirmaciónSalidaToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles ConfirmaciónSalidaToolStripMenuItem.Click
        Dim confirm As New frmConfirmarSalida
        confirm.MdiParent = Me
        confirm.Show()
    End Sub

    Private Sub ConfirmaciónDeCargaToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles ConfirmaciónDeCargaToolStripMenuItem.Click
        Dim salida As New frmConfirmCarga
        salida.MdiParent = Me
        salida.Show()
    End Sub

    Private Sub IngresoDePedidosToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles IngresoDePedidosToolStripMenuItem.Click
        formDocumento.MdiParent = Me
        formDocumento.Show()
    End Sub

    Private Sub ClientesToolStripMenuItem1_Click(sender As System.Object, e As System.EventArgs) Handles ClientesToolStripMenuItem1.Click
        Dim cliente As New frmRegistroClientes
        cliente.MdiParent = Me
        cliente.Show()
    End Sub

    Private Sub AgenciaToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles AgenciaToolStripMenuItem.Click
        Dim agencia As New frmAgenciaTransporte
        agencia.MdiParent = Me
        agencia.Show()
    End Sub

    Private Sub AsignaciónToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles AsignaciónToolStripMenuItem.Click
        If veces = 0 Then
            Dim asignacion As New frmAsignaPickeador
            asignacion.MdiParent = Me
            asignacion.Show()
            asignacion.listarPedidos()
            asignacion.listarPickeadores()
            veces = 1
        End If
    End Sub

    Private Sub AsignarBalanzaToolStripMenuItem1_Click(sender As System.Object, e As System.EventArgs) Handles AsignarBalanzaToolStripMenuItem1.Click
        Dim asignarBalanza As New frmAsignarBalanza
        asignarBalanza.MdiParent = Me
        asignarBalanza.Show()
    End Sub

    Private Sub TransferenciaToolStripMenuItem1_Click(sender As System.Object, e As System.EventArgs) Handles TransferenciaToolStripMenuItem1.Click
        Dim transfer As New frmTransferenciaPedidos
        transfer.MdiParent = Me
        transfer.Show()
    End Sub

    Private Sub PedidosAsignadosToolStripMenuItem1_Click(sender As System.Object, e As System.EventArgs) Handles PedidosAsignadosToolStripMenuItem1.Click
        Dim pedidosAsig As New frmPedidosAsignados
        pedidosAsig.MdiParent = Me
        pedidosAsig.Show()
    End Sub

    Private Sub EmbalajeToolStripMenuItem1_Click(sender As System.Object, e As System.EventArgs) Handles EmbalajeToolStripMenuItem1.Click
        Dim detallePedido As New frmDetallePedido
        detallePedido.MdiParent = Me
        detallePedido.Show()
    End Sub

    Private Sub RetornoDeVehículosToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles RetornoDeVehículosToolStripMenuItem.Click
        Dim reparto As New frmReparto
        reparto.MdiParent = Me
        reparto.Show()
    End Sub

    Private Sub PedidosToolStripMenuItem1_Click(sender As System.Object, e As System.EventArgs) Handles PedidosToolStripMenuItem1.Click
        Dim pedi As New frmReporte
        pedi.MdiParent = Me
        pedi.Show()
    End Sub

    Private Sub IntegralToolStripMenuItem1_Click(sender As System.Object, e As System.EventArgs) Handles IntegralToolStripMenuItem1.Click
        Dim integral As New frmReporteIntegral
        integral.MdiParent = Me
        integral.Show()
    End Sub

    Private Sub BultosToolStripMenuItem1_Click(sender As System.Object, e As System.EventArgs) Handles BultosToolStripMenuItem1.Click
        Dim bultos As New frmImpresionBultos
        bultos.MdiParent = Me
        bultos.Show()
    End Sub

    Private Sub ProgramacióToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles ProgramacióToolStripMenuItem.Click
        If vezImprePro = 0 Then
            Dim prog As New frmImpresionProgramacion
            prog.MdiParent = Me
            prog.Show()
            vezImprePro = 1
        End If
    End Sub

    Private Sub DistribuciónToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles DistribuciónToolStripMenuItem.Click
        Dim distribucion As New frmDistribucion
        distribucion.MdiParent = Me
        distribucion.Show()
    End Sub

    Private Sub LargosToolStripMenuItem1_Click(sender As System.Object, e As System.EventArgs) Handles LargosToolStripMenuItem1.Click
        Dim largo As New frmImpresionLargos
        largo.MdiParent = Me
        largo.Show()
    End Sub

    Private Sub AprobaciónDePedidosToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles AprobaciónDePedidosToolStripMenuItem.Click
        Dim aprobacion As New frmAprobacionPedidos
        aprobacion.MdiParent = Me
        aprobacion.Show()
    End Sub

    Private Sub OrdenesCompraToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles OrdenesCompraToolStripMenuItem.Click
        Dim ordenes As New frmListarOrdenesCompra
        ordenes.MdiParent = Me
        ordenes.Show()
    End Sub

    Private Sub ListadoDeArticulosToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles ListadoDeArticulosToolStripMenuItem.Click
        Dim articulos As New frmListadoArticulos
        articulos.MdiParent = Me
        articulos.Show()
    End Sub

    Private Sub KardexArticuloToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles KardexArticuloToolStripMenuItem.Click
        Dim kardex As New frmKardexArticulo("", "", "", "", "", "", "")
        kardex.MdiParent = Me
        kardex.Show()
    End Sub

    Private Sub EtiquetasToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles EtiquetasToolStripMenuItem.Click
        Dim etiquetas As New frmImpresionBarras
        etiquetas.MdiParent = Me
        etiquetas.Show()
    End Sub

    Private Sub XOrdenCompraToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles XOrdenCompraToolStripMenuItem.Click
        Dim impreOrden As New frmConsultaXOC
        impreOrden.MdiParent = Me
        impreOrden.Show()
    End Sub

    Private Sub OrdenDeCompraToolStripMenuItem_Click(sender As System.Object, e As System.EventArgs) Handles OrdenDeCompraToolStripMenuItem.Click
        Dim orden As New frmOrdenesCompraSIS
        orden.MdiParent = Me
        orden.Show()
    End Sub

End Class